//数据服务目录
config = {
	OPENAPI : {
		filter:[ 
			{type:'label',name:'供应者',code:'CREATE_USER',storesql:"SELECT DISTINCT create_user FROM dacp_dataex_api ",where:"create_user in('{selfval}')"}
//			,{type:'label',name:'类别',code:'BUSI_TYPE',storesql:"select distinct BUSI_TYPE from dacp_dataex_api where creater='dacp'",where:"BUSI_TYPE in('{selfval}')"}
//			,{type:'label',name:'权限级别',code:'API_AUTH_TYPE',storesql:"select distinct API_AUTH_TYPE from dacp_dataex_api where creater='dacp'",where:"API_AUTH_TYPE in('{selfval}')"}
			,{type:'text',name:'名称',code:'API_NAME',where:"API_NAME like '%{selfval}%'" }
		],
		toolbar:[
		         {type:'button',fieldLabel:'导出',width:120,actionId:'exportTAB',name:'exportTAB'}
		],
		list:{
			title : '能力开放平台',
			sql : "SELECT *,'OPENAPI' AS OBJTYPE  FROM  dacp_dataex_api ",
			tpl : '<div class="dacptiles panel panel-default " id="{{XMLID}}" title="{{API_LABEL}}" objtype="OPENAPI"><div class="row"><div class="col-md-4">      <span class="glyphicon glyphicon-cloud" style="margin-top:1px;margin-left:10px;  font-size:48px;color:blue "></span>      <code>{{CATEGORY}}</code></div><div class="col-md-8"><div style="margin-left:-60px;"><h5>{{API_LABEL}}</h5><small>{{API_CODE}}</small><code style="right: 15px;top: 0px;position: absolute;">{{STATE}}</code></div></div></div><div class="row">    <div class="col-md-12">     <small> {{REQUEST_URL}}</small></div></div><div class="row fieldinfo"></div><div class="panel-footer bg-light lter text-center" style="margin-top:10px"><div class="row pull-out"><div class="col-xs-4"><a href="#" actid="configColumn" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block">{{ROWNUM_CNVAL}}</span><small class="text-muted ">使用人数</small></div></a></div><div class="col-xs-4 dk"><a href="#" actid="rejectApplyData" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block">{{FIELDCNNUM}}</span><small class="text-muted ">使用次数</small></div></a></div><div class="col-xs-4"><a href="#" actid="agreeApplyData" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block"><span class="glyphicon glyphicon-thumbs-up"></span></span><small class="text-muted ">评价</small></div></a></div></div></div></div>',
			detailurl:'/{contextPath}/ftl/datastore/apiDetail?objname={XMLID}',
			columns : [
			{
				header : "API编码",
				dataIndex : 'API_CODE',
				headerAlign : "center",
				dataAlign : "center",
				width : "80%",
				sortable : true,
				render : function(rowData, colVal) {
					var html = '<div class="media">'
							+ '<div class="media-left">'
							+ '<a href="#">'
							+ '    <img class="media-object" alt="" src="/'
							+ contextPath
							+ '/dacp-res/images/table.png" style="width: 60px; height: 40px;">'
							+ '  </a>'
							+ '</div>'
							+ '<div class="media-body">'
							+ '  <h4 class="media-heading">'
							+ rowData.API_CODE
							+ ","
							+ rowData.API_LABEL
							+ '</h4>'
							+ '  <p><code>位置:'
							+ rowData.TOPICCODE
							+ '&nbsp;&nbsp;</code>+'
							+ rowData.CATEGORY
							+ ' <a type="button" class="btn btn-primary btn-xs pull-right">申请数据</a>	</p>'
							+ '  <p class="text-muted m-t-sm small">'
							+ rowData.API_DESCR
							+ '</p>'
							+ '<div class="text-muted"> <i class="fa fa-user icon-muted"></i> by <a href="#" class="m-r-sm">Admin</a> <i class="fa fa-clock-o icon-muted"></i> Feb 20, 2013 <a href="#" class="m-l-sm"><i class="fa fa-comment-o icon-muted"></i> 2 comments</a> </div>'
							// +' <p><button type="button" class="btn
							// btn-primary">申请数据</button></p>'
							+ '</div>'

							+ '</div>'
					return html;
				}
			}
			] 
		}
	},
	TAB : {
		title : '数据',
		sql : "select XMLID,'TAB' OBJTYPE,DATANAME,DATACNNAME,DBNAME,TOPICCODE,TEAM_CODE,CYCLETYPE,ROWNUM_VAL,FIELDNUM,STATE_DATE,STATE,CURDUTYER,REMARK from tablefile",
		//tpl : '<div class="dacptiles panel panel-success " id="{{XMLID}}" title="{{DATANAME}}" objtype="TAB"><header class="panel-heading"><i class="fa fa-th"></i>&nbsp;{{DBCNNAME}}<ul class="nav nav-pills pull-right"><li><a>申请</a></li></ul></header><div class="row"><div class="col-md-12" style="padding-left:30px;text-align:left;"><h5><b>{{DATANAME}}</b></h5><small>{{DATACNNAME}}</small></div></div><div class="row fieldinfo"></div><div class="panel-footer bg-light lter text-center" style="margin-top:10px"><div class="row pull-out"><div class="col-xs-4"><div class="padder-v"><span class="m-b-xs h5 block">{{FIELDCNNUM}}</span><small class="text-muted">字段数</small></div></div><div class="col-xs-4 dk"><div class="padder-v"><small class="m-b-xs h5 block">{{ROWNUM_CNVAL}}</small><small class="text-muted">记录数</small></div></div><div class="col-xs-4"><div class="padder-v"><small class="m-b-xs h5 block">{{STATE_DATE}}</small><small class="text-muted">状态时间</small></div></div></div></div></div>',
		// tpl:'<div class="dacptiles panel panel-success " id="{{XMLID}}" title="{{DATANAME}}" objtype="TAB"><header class="panel-heading"><span class="part-one">{{CYCLECNTYPE}}</span>      <span class="part-two">{{DBCNNAME}}</span><ul class="nav nav-pills pull-right"></ul></header><div class="row"><div class="col-md-12" style="padding-left:30px;text-align:left;"><h5><b>{{DATANAME}}<b></b></b></h5><b><b><small><b>{{DATACNNAME}}</b></small></b></b></div></div><div class="row fieldinfo"></div><div class="panel-footer bg-light lter text-center" style="margin-top:10px"><div class="row pull-out"><div class="col-xs-4"><div class="padder-v"><span class="m-b-xs h5 block">{{FIELDCNNUM}}</span><small class="text-muted">字段数</small></div></div><div class="col-xs-4 dk"><div class="padder-v"><small class="m-b-xs h5 block">{{ROWNUM_CNVAL}}</small><small class="text-muted">记录数</small></div></div><div class="col-xs-4"><div class="padder-v"><small class="m-b-xs h5 block">{{STATE_DATE}}</small><small class="text-muted">状态时间</small></div></div></div></div></div>',
		tpl:'<div class="dacptiles panel panel-success " id="{{XMLID}}" title="{{DATANAME}}" objtype="TAB"> <header class="panel-heading"> <span class="part-one">{{CYCLECNTYPE}}</span> <span class="part-two">{{DBCNNAME}}</span> <ul class="nav nav-pills pull-right"></ul> </header> <div class="row"> <div class="col-md-12" style="padding-left:30px;text-align:left;"> <h5> <b>{{DATANAME}}<b></b></b> </h5> <b><b><small><b>{{DATACNNAME}}</b></small></b></b> </div> </div> <div class="row fieldinfo"></div> <div class="panel-footer bg-light lter text-center" style="margin-top:10px"> <div class="row pull-out"> <div class="col-xs-4"> <div class="padder-v"> <small class="m-b-xs h5 block">{{FIELDCNNUM}}</small><small class="text-muted">字段数</small> </div> </div> <div class="col-xs-4 dk"> <div class="padder-v"> <small class="m-b-xs h5 block">{{ROWNUM_CNVAL}}</small><small class="text-muted">记录数</small> </div> </div> <div class="col-xs-4"> <div class="padder-v"> <small class="m-b-xs h5 block">{{STATE_DATE}}</small><small class="text-muted">状态时间</small> </div> </div> </div> </div> </div>',
		columns : [
		{
			header : "数据库",
			dataIndex : 'DBNAME',
			headerAlign : "center",
			dataAlign : "center",
			width : "80%",
			sortable : true,
			render : function(rowData, colVal) {
				var html = '<div class="media">'
						+ '<div class="media-left">'
						+ '<a href="#">'
					 
						+ '    <img class="media-object" alt="" src="/'
						+ contextPath
						// + '/dacp-res/me/images/database/'+dataplatIcon[colVal]+'.png" style="width: 100px; height: 80px;">'
						+ '/dacp-res/images/table.png" style="width: 60px; height: 40px;">'
						+ '  </a>'
						+ '</div>'
						+ '<div class="media-body">'
						+ '  <h4 class="media-heading"><a href="#">'
						+ rowData.DATANAME.toLowerCase()
						+ ","
						+ rowData.DATACNNAME
						+ '</a></h4>'
						+ '  <p><code>数据库:'
						+ colVal
						+ '</code>,创建团队:'+rowData.TEAM_CODE+',主题：'+rowData.TOPICCNNAME+',<a type="button" class="btn btn-primary btn-xs pull-right" onclick="$(this).dblclick();">详细信息</a></p>'
						+ '  <p class="text-muted m-t-sm small">'+(rowData.REMARK||'无详细信息')+'</p>'
						+ '<div class="text-muted"> <i class="fa fa-user icon-muted"></i> by <a href="#" class="m-r-sm">' + (rowData.CURDUTYER||'--') + '</a> <i class="fa fa-clock-o icon-muted"></i> ' + rowData.STATE_DATE + ' <a href="#" class="m-l-sm"><i class="fa fa-comment-o icon-muted"></i> 2 comments</a> </div>'
						+ '</div>'
						+ '</div>';
				return html;
			}
		}
		]
	},
	TAB_OPEN:{
    	sql : "select XMLID,'TAB' OBJTYPE,DATANAME,DATACNNAME,DBNAME,TOPICCODE,CYCLETYPE,ROWNUM_VAL,FIELDNUM,STATE_DATE,STATE,REMARK,OPEN_STATE from tablefile where OPEN_STATE='开放' "
    	,columns : [
    		   		{
    		   			header : "数据库",
    		   			dataIndex : 'DBNAME',
    		   			headerAlign : "center",
    		   			dataAlign : "center",
    		   			width : "80%",
    		   			sortable : true,
    		   			render : function(rowData, colVal) {
    		   				var html = '<div class="media">'
    		   						+ '<div class="media-left">'
    		   						+ '<a href="#">'
    		   					 
    		   						+ '    <img class="media-object" alt="" src="/'
    		   						+ contextPath
    		   						// + '/dacp-res/me/images/database/'+dataplatIcon[colVal]+'.png" style="width: 100px; height: 80px;">'
    		   						+ '/dacp-res/images/table.png" style="width: 60px; height: 40px;">'
    		   						+ '  </a>'
    		   						+ '</div>'
    		   						+ '<div class="media-body">'
    		   						+ '  <h4 class="media-heading"><a href="#">'
    		   						+ rowData.DATANAME.toLowerCase()
    		   						+ ","
    		   						+ rowData.DATACNNAME
    		   						+ '</a></h4>'
    		   						+ '  <p><code>数据库:'
    		   						+ colVal
    		   						+ '</code>,创建团队:'+rowData.TEAM_CODE+',主题：'+rowData.TOPICCNNAME+',<a type="button" class="btn btn-primary btn-xs pull-right" onclick="$(this).dblclick();">详细信息</a></p>'
    		   						+ '  <p class="text-muted m-t-sm small">'+(rowData.REMARK||'无详细信息')+'</p>'
    		   						+ '<div class="text-muted"> <i class="fa fa-user icon-muted"></i> by <a href="#" class="m-r-sm">' + (rowData.CURDUTYER||'--') + '</a> <i class="fa fa-clock-o icon-muted"></i> ' + rowData.STATE_DATE + ' <a href="#" class="m-l-sm"><i class="fa fa-comment-o icon-muted"></i> 2 comments</a> </div>'
    		   						+ '</div>'
    		   						+ '</div>';
    		   				return html;
    		 }
    	 }
      ]
	},
    OPENAPI_SDK_OPEN:{
		title : '能力开放平台',
		sql : "SELECT XMLID,'OPENAPI' OBJTYPE,API_NAME  API_CODE,API_NAME_ZH API_LABEL,REMARK API_DESCR,BUSI_TYPE CATEGORY, VERSEQ, STATE, TOPICCODE FROM  do_api_list a where creater='DACP'",
		tpl : '<div class="dacptiles panel panel-default " id="{{XMLID}}" title="{{API_LABEL}}" objtype="OPENAPI"><div class="row"><div class="col-md-4">      <span class="glyphicon glyphicon-cloud" style="margin-top:1px;margin-left:10px;  font-size:48px;color:blue "></span>      <code>{{CATEGORY}}</code></div><div class="col-md-8"><div style="margin-left:-60px;"><h5>{{API_LABEL}}</h5><small>{{API_CODE}}</small><code style="right: 15px;top: 0px;position: absolute;">{{STATE}}</code></div></div></div><div class="row">    <div class="col-md-12">     <small> {{REQUEST_URL}}</small></div></div><div class="row fieldinfo"></div><div class="panel-footer bg-light lter text-center" style="margin-top:10px"><div class="row pull-out"><div class="col-xs-4"><a href="#" actid="configColumn" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block">{{ROWNUM_CNVAL}}</span><small class="text-muted ">使用人数</small></div></a></div><div class="col-xs-4 dk"><a href="#" actid="rejectApplyData" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block">{{FIELDCNNUM}}</span><small class="text-muted ">使用次数</small></div></a></div><div class="col-xs-4"><a href="#" actid="agreeApplyData" class="metaaction" style="color:red"><div class="padder-v "><span class="m-b-xs h5 block"><span class="glyphicon glyphicon-thumbs-up"></span></span><small class="text-muted ">评价</small></div></a></div></div></div></div>',
		detailurl:'/{contextPath}/ftl/datastore/apiDetail?objname={XMLID}',
		columns : [
		{
			header : "API编码",
			dataIndex : 'API_CODE',
			headerAlign : "center",
			dataAlign : "center",
			width : "80%",
			sortable : true,
			render : function(rowData, colVal) {
				var html = '<div class="media">'
						+ '<div class="media-left">'
						+ '<a href="#">'
						+ '    <img class="media-object" alt="" src="/'
						+ contextPath
						+ '/dacp-res/images/table.png" style="width: 60px; height: 40px;">'
						+ '  </a>'
						+ '</div>'
						+ '<div class="media-body">'
						+ '  <h4 class="media-heading">'
						+ rowData.API_CODE
						+ ","
						+ rowData.API_LABEL
						+ '</h4>'
						+ '  <p><code>位置:'
						+ rowData.TOPICCODE
						+ '&nbsp;&nbsp;</code>+'
						+ rowData.CATEGORY
						+ ' <a type="button" class="btn btn-primary btn-xs pull-right">申请数据</a>	</p>'
						+ '  <p class="text-muted m-t-sm small">'
						+ rowData.API_DESCR
						+ '</p>'
						+ '<div class="text-muted"> <i class="fa fa-user icon-muted"></i> by <a href="#" class="m-r-sm">Admin</a> <i class="fa fa-clock-o icon-muted"></i> Feb 20, 2013 <a href="#" class="m-l-sm"><i class="fa fa-comment-o icon-muted"></i> 2 comments</a> </div>'
						// +' <p><button type="button" class="btn
						// btn-primary">申请数据</button></p>'
						+ '</div>'

						+ '</div>'
				return html;
			}
		}
		] 
	}
};

/*数据门户首页配置*/
/*advanceFilter={
	TAB_OPEN:[  {type:'label',name:'数据主题',code:'DIM_DATALEVEL',storesql:"客户,用户,帐户,资费,大客户,VPMN,积分,订单,工单,咨询受理",where:"datacnname like '%{selfval}%'"}
		,{type:'label',name:'数据库',code:'dbname',storesql:"select distinct dbname from tablefile where dbname is not null",where:"dbname in('{selfval}')"}
		,{type:'label',name:'提供商',code:'team_code',storesql:"select distinct b.team_code,b.team_name from tablefile a,meta_team b where a.team_code=b.team_code",where:"team_code in('{selfval}')"}
		,{type:'label',name:'敏感级别',code:'rightlevel',storesql:"select distinct rightlevel from tablefile",where:"rightlevel in('{selfval}')"}
		,{type:'label',name:'表大小',code:'rownum_val',storesql:"小表,100万,100-1000万,1000-5000万,5000万-3亿,3亿-10亿,超大表",where:"level_val in('{selfval}')"}
		,{type:'text',name:'表名/字段名',code:'fieldname',where:"dataname like '%{selfval}%'" }
		,{type:'label',name:'共享属性',code:'owner',storesql:"已经申请的数据,可申请的数据,我共享的数据",where:"dataname like '%{selfval}%'"}
	],
    OPENAPI_OPEN:[
		{type:'label',name:'类别',code:'DIM_DATALEVEL',storesql:"客户,用户,帐户,资费",where:"DIM_PORTAL_PAHT1 in('{selfval}')"}
		,{type:'label',name:'类型',code:'BUSI_TYPE',storesql:"select distinct BUSI_TYPE from do_api_list",where:"BUSI_TYPE in('{selfval}')"}
		,{type:'label',name:'安全级别',code:'API_AUTH_TYPE',storesql:"select distinct API_AUTH_TYPE from do_api_list",where:"API_AUTH_TYPE in('{selfval}')"}
		//,{type:'label',name:'重要程度',code:'DIM_ZB_ZBTYPE2',storesql:"select ROWCODE,ROWNAME from metaedimdef where dimcode='DIM_ZB_ZBTYPE2'",where:"DIM_PORTAL_PAHT1 in('{selfval}')"}
		//,{type:'label',name:'重要程度',code:'DIM_PORTAL_PAHT1',storesql:"select ROWCODE,ROWNAME from metaedimdef where dimcode='DIM_PORTAL_PAHT1'",where:"DIM_PORTAL_PAHT1 in('{selfval}')"}
		,{type:'text',name:'名称',code:'API_NAME',where:"API_NAME like '%{selfval}%'" }
		//,{type:'text',name:'表名',code:'dataname',where:"dataname like '%{selfval}%'"}
    ],
    OPENAPI_SDK_OPEN:[
		{type:'label',name:'供应者',code:'TOPICCODE',storesql:"select distinct TOPICCODE from do_api_list where creater='dacp'",where:"TOPICCODE in('{selfval}')"}
		,{type:'label',name:'类别',code:'BUSI_TYPE',storesql:"select distinct BUSI_TYPE from do_api_list where creater='dacp'",where:"BUSI_TYPE in('{selfval}')"}
		,{type:'label',name:'权限级别',code:'API_AUTH_TYPE',storesql:"select distinct API_AUTH_TYPE from do_api_list where creater='dacp'",where:"API_AUTH_TYPE in('{selfval}')"}
		,{type:'text',name:'名称',code:'API_NAME',where:"API_NAME like '%{selfval}%'" }
		//,{type:'text',name:'表名',code:'dataname',where:"dataname like '%{selfval}%'"}
    ]
}*/